package com.gxuwz.zhangjiahui.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxuwz.zhangjiahui.entity.Budget;
import com.gxuwz.zhangjiahui.entity.Enclosure;
import com.gxuwz.zhangjiahui.mapper.BudgetMapper;
import com.gxuwz.zhangjiahui.mapper.EnclosureMapper;
import com.gxuwz.zhangjiahui.service.IBudgetService;
import com.gxuwz.zhangjiahui.service.IEnclosureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhangjiahui
 * @since 2021-06-20
 */
@Service
public class EnclosureServiceImpl extends ServiceImpl<EnclosureMapper, Enclosure> implements IEnclosureService {

    @Autowired
    private EnclosureMapper enclosureMapper;

    @Override
    public Enclosure findEnclosureById(Enclosure enclosure) {
        return enclosureMapper.findEnclosureById(enclosure);
    }

    @Override
    public List<Enclosure> findEnclosureByProject(Enclosure enclosure) {
        return enclosureMapper.findEnclosureByProject(enclosure);
    }

    @Override
    public List<Enclosure> findEnclosureAll() {
        return enclosureMapper.findEnclosureAll();
    }

    @Override
    public IPage<Enclosure> selectEnclosurePage(Page<Enclosure> page, Wrapper<Enclosure> wrapper) {
        return enclosureMapper.selectEnclosurePage(page, wrapper);
    }

    @Override
    public void addEnclosure(Enclosure enclosure) {
        enclosureMapper.addEnclosure(enclosure);
    }

    @Override
    public void updateEnclosureById(Enclosure enclosure) {
        enclosureMapper.updateEnclosureById(enclosure);
    }

    @Override
    public void deleteEnclosureById(Enclosure enclosure) {
        enclosureMapper.deleteEnclosureById(enclosure);
    }
}
